Mode Number = (CPOL << 1) | CPHA
| SPI Mode | CPOL | CPHA | Clock Idle | Data Shifted On | Data Sampled On |
|---|---|---|---|---|---|
| 0 | 0 | 0 | LOW | Falling edge + when SS activates | Rising edge |
| 1 | 0 | 1 | LOW | Rising edge | Falling edge |
| 2 | 1 | 0 | HIGH | Rising edge + when SS activates | Falling edge |
| 3 | 1 | 1 | HIGH | Falling edge | Rising edge |
Notes:
- Modes can also be written as (CPOL, CPHA) pairs → e.g. Mode 1 = (0, 1).
- In full-duplex, master can transmit and receive using different modes at the same time.
- Some vendors use alternative terms:
- CKE = Clock Edge (often equivalent to CPHA)
- NCPHA = Inverted CPHA setting